home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1178_disabled_gdb_privileges.rtf < prev    next >
Text File  |  1995-06-12  |  3KB  |  48 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw11360
  3. \paperh6960
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  In my application, I invoke other commands and programs by using 
  8. \b system
  9. \b0 () or other relatives like 
  10. \b popen
  11. \b0 (), 
  12. \b execl
  13. \b0 () .  Sometimes when debugging my application, I run into this error message:\
  14. \
  15.     
  16. \f1\fs24\fc1\cf1 sh: privileges disabled because of outstanding IPC access to task\
  17. \
  18.  
  19. \f0\fs28 What does it mean and what can I do about it?\
  20. \
  21. A:  This has to do with an unfortunate interaction between gdb and setuid program execution.    When gdb is d
  22. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1 ebugging 
  23. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 a
  24. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1  process, it owns the exception ports of that process.
  25. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1   
  26. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1 When 
  27. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 that
  28. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1  process forks a child process, 
  29. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 gdb would own the exception ports of that child process as well.   Because of security issues, the kernel disallows gdb from owning the exceptions ports of a child process that is setuid.  When you attempt this, the kernel
  30. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1  generates the 
  31. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 p
  32. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1 rivileges error 
  33. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 message and the 
  34. \b system
  35. \b0 () call fails
  36. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1 .\
  37.  
  38. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0\cf0 \
  39.  
  40. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1\cf1 There will be no conflict outside the debugger and you can run gdb as root as a workaround for debugging.\
  41. \
  42.  
  43. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0\cf0 QA849\
  44. \
  45. Valid for 1.0, 2.0, 3.0\
  46. \
  47.  
  48.